#include <stdlib.h>
#include <string.h>


#include "../../1_Application/Include/APP_WorkingNormalState.h"


#define __ON_BOARDING__
#include "../../2_Process/Include/Cmp_Onboarding.h"
#undef __ON_BOARDING__


#include "../../3_Component/Include/Cmp_KeyScan.h"


#include "../../4_Library/Include/Int.h"
#include "../../4_Library/Include/Lib_CommSubMicom.h"

#include "../../6_Vablesource/Include/Vable_ModelInformation.h"


void Cmp_OnBodCommModeSet(void);
UINT8 Cmp_OnBodOptionCheck(void);



void Cmp_OnboardingCheck()
{
	if(Get_JigPlatform() == Vivace)
	{
		Cmp_OnBodCommModeSet();
	}
	else
	{
		gunCommOper = NormalComm;
	}
}


void Cmp_OnBodCommModeSet()
{
	if(Onboarding_ModelFlag == DIS_ONBOARD)
	{
		gunCommOper = NormalComm;
	}
	else
	{
		if(Cmp_OnBodOptionCheck())
	 	{
			gunCommOper = NormalComm;
			Get_OPTION()[_FCT_Send_OP] = CLR;
		}
		else
	 	{
			Get_OPTION()[_FCT_Send_OP] = Get_OPTION()[_PC_Recv_OP];
			gunCommOper = LoadOpComm;
		}
	}
}

UINT8 Cmp_OnBodOptionCheck()
{
	if(gunCommOper == NormalComm)
	{
		if(Get_OPTION()[_Real_Option] == Get_OPTION()[_PC_Recv_OP])
		{
			return RETURN_OK;
		}
	}
	else
	{
		if(Get_OPTION()[_FCT_Recv_OP] == Get_OPTION()[_PC_Recv_OP])
		{
			return RETURN_OK;
		}
	}

	return RETURN_NG;
}









